import hashlib


class MD5Util:

    @classmethod
    def md5(cls, text):
        m = hashlib.md5()
        m.update(text.encode('utf-8'))
        return m.hexdigest()

    @classmethod
    def md5_16(cls, text):
        m = hashlib.md5()
        m.update(text.encode('utf-8'))
        return m.hexdigest()[8:-8]
